scalar JSON

type Query {
  user(id: String, limit: Int, after: Int, offset: Int): [User]
  heliconeRequest(
    limit: Int
    offset: Int
    filters: [HeliconeRequestFilter!]
  ): [HeliconeRequest]
  aggregatedHeliconeRequest(
    properties: [PropertyFilter!]
  ): AggregatedHeliconeRequest
  heliconeJob(
    id: String
    limit: Int
    offset: Int
    filters: [HeliconeJobFilter!]
  ): [HeliconeJob]
  heliconeNode(
    id: String
    limit: Int
    offset: Int
    job_id: String
    filters: [HeliconeNodeFilter!]
  ): [HeliconeNode]
}

type HeliconeJob {
  id: String!
  name: String!
  description: String
  status: String!
  created_at: String!
  updated_at: String!
  timeout_seconds: Int!
  node_count: Int!
  request_count: Int!
  properties: [Property]
}

type HeliconeNode {
  id: String!
  name: String!
  description: String
  created_at: String!
  updated_at: String!
  job_id: String!
  parent_node_ids: [String!]
  properties: [Property]
}

type AggregatedHeliconeRequest {
  id: ID!
  cost: Float
  costUSD: Float
  count: Int!
  firstRequest: String!
  lastRequest: String!
  cache: Cache
}

type Cache {
  hits: Int!
  misses: Int!
  savedUSD: Float!
}

type HeliconeRequest {
  id: ID!
  costUSD: Float!
  model: String!
  createdAt: String!
  response: String
  user: User
  cacheHits: Int
  properties: [Property]
  values: [Value]
  responseBody: JSON
  requestBody: JSON
  latency: Float
  feedback: Feedback
}

type Feedback {
  rating: Boolean!
}

input HeliconeRequestFilter {
  id: NumberOperators
  requestId: TextOperators
  prompt: TextOperators
  response: TextOperators
  user: TextOperators
  property: PropertyFilter
  createdAt: DateOperators
  feedback: FeedbackFilter
  model: TextOperators
}

input FeedbackFilter {
  rating: Boolean
}

input PropertyFilter {
  name: String!
  value: TextOperators!
}

input HeliconeJobFilter {
  id: TextOperators
  name: TextOperators
  description: TextOperators
  created_at: DateOperators
  updated_at: DateOperators
  property: PropertyFilter
}

input HeliconeNodeFilter {
  id: TextOperators
  name: TextOperators
  description: TextOperators
  created_at: DateOperators
  updated_at: DateOperators
  property: PropertyFilter
}

input ValueFilter {
  name: String!
  value: TextOperators!
}

type Property {
  name: String
  value: String
}

type Value {
  name: String
  value: String
}

type User {
  id: String!
  # models: [Model!]
  total_requests: Int
  total_completion_tokens: Float
  total_prompt_tokens: Float
  total_tokens: Float
}

type Model {
  id: String!
  name: String
  total_requests: Int
  total_completion_tokens: Int
  total_prompt_tokens: Int
  total_tokens: Int
}

input TextOperators {
  equals: String
  like: String
  ilike: String
  contains: String
  not_contains: String
  not_equals: String
}

input NumberOperators {
  equals: Float
  gte: Float
  lte: Float
  not_equals: Float
}

input DateOperators {
  gte: String
  lte: String
  lt: String
  gt: String
}
